﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Classes;

namespace FlightSystemDBLayer
{
    class Program
    {
        static void Main(string[] args)
        {
            IFlight dbFlight = new DBFlight();
            SQLAccess.Open();
            DBCity dbCity = new DBCity();
            IList<Flight> flights = new List<Flight>();
            flights = dbFlight.GetFlights();
            
                foreach (Flight f in flights)
                {
                    Console.WriteLine(f.From.Name);
                }
            

            //City city = dbCity.FindCityByID(1);
            //City city2 = dbCity.FindCityByID(2);

            //Console.WriteLine(city.Name);
            //Console.WriteLine(city2.Name);

            Console.ReadLine();
        }
    }
}
